<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateProjectTaskTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('project_task', function (Blueprint $table) {
            $table->increments('id');
            $table->string('pro_number')->comment('项目编号');
            $table->string('name')->comment('名称');
            $table->string('pcp')->comment('责任人');
            $table->integer('user_id')->comment('创建人');
            $table->tinyInteger('status');
            $table->timestamp('started_at')->comment('开始时间');
            $table->timestamp('ended_at')->comment('结束时间');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('project_task');
    }
}
